package com.tanhua.server.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.server.mapper.SettingsMapper;
import com.tanhua.server.pojo.Settings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: Administrator
 * @date: Created in 2021/3/3 17:11
 * @version: 0.0.1
 * @modified By:
 */
@Service
public class SettingsService {

    @Autowired
    private SettingsMapper settingsMapper;


    public Settings querySettingsByUserId(Long userId) {
        QueryWrapper<Settings>queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("user_id",userId);
        Settings settings = this.settingsMapper.selectOne(queryWrapper);
        return settings;
    }
}
